package com.dykj.fireFighting.server.base.analysis.mapper;

import com.dykj.fireFighting.api.base.analysis.entity.DeviceRes;
import com.dykj.fireFighting.api.base.analysis.entity.EarlyWarningResult;
import com.dykj.fireFighting.api.base.analysis.entity.TongHuanBiRes;
import com.dykj.fireFighting.common.core.mapper.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeviceMapMapper extends SuperMapper<EarlyWarningResult> {

    List<EarlyWarningResult> getEarlyWarningByYear(String beginTime, String endTime, String unitId, String centerId);

    List<EarlyWarningResult> getEarlyWarningByQuarter(String beginTime, String endTime, String unitId, String centerId);

    List<EarlyWarningResult> getEarlyWarningByMonth(String beginTime, String endTime, String unitId, String centerId);

    List<EarlyWarningResult> getEarlyWarningByDay(String beginTime, String endTime, String unitId, String centerId);

    Integer getSumNumToday();

    Integer getSumNumAll();

    List<DeviceRes> getLevelByUnitIdAndTime(String moudleType,@Param("ids") List<String> ids, String beginTime, String endTime);

    List<DeviceRes> getTrendByUnitIdAndTime(String moudleType,@Param("ids") List<String> ids, String beginTime, String endTime, String timeGranularity);

    List<DeviceRes> getAreaOrBusinessByTime(String moudleType, String beginTime, String endTime,String dataDimension);

    List<DeviceRes> getAreaOrBusinessTrend(String moudleType, String beginTime, String endTime, String dataDimension, String timeGranularity);

    Integer getAreaOrBusinessRatiod(String moudleType, String beginTime, String endTime, String dataDimension);

    String getTongBiByTime(String moudleType, String time, String timeGranularity);

    List<TongHuanBiRes> getTongBiByTimeAndUnitId(String moudleType,String beginTime, String endTime, String timeGranularity, List<String> ids,Integer interval);

    List<TongHuanBiRes> getTongBiByTimeAndUnitIdByMonth(String moudleType, String beginTime, String endTime, String timeGranularity, List<String> ids, int interval);

    List<TongHuanBiRes> getTongBiByTimeByMonth(String moudleType, String beginTime, String endTime, String timeGranularity, int interval);

    List<TongHuanBiRes> getAreaOrBusinessTongBiByTime(String moudleType, String beginTime, String endTime, String timeGranularity, String dataDimension, int interval);

    List<TongHuanBiRes> getAreaOrBusinessTongBiByTimeByMonth(String moudleType, String beginTime, String endTime, String timeGranularity, String dataDimension, int interval);

    List<TongHuanBiRes> getHuanBiByTimeAndUnitId(String moudleType, String beginTime, String endTime, String timeGranularity, List<String> ids);

    List<TongHuanBiRes> getAreaOrBusinessHuanBiByTime(String moudleType, String beginTime, String endTime, String timeGranularity, String dataDimension);
}
